package com.lin.test.modle;

/**
 * Created by 林云志 on 2018/9/19.
 */
public class Hero extends Base {
    private String name;
    private Weapon weapon;

    public Hero(){

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Weapon getWeapon() {
        return weapon;
    }
    @Inject
    public void setWeapon(Weapon weapon) {
        this.weapon = weapon;
    }
    public void fight(){
        System.out.println(name + "开始攻击了");
        weapon.attck();
    }
}
